package com.itcs.jpa;


import com.itcs.jpa.hibernate.JpaCondition;

/**
 * @ClassName: ConditionFactory 
 * @Description: TODO
 * @author CHEN-HF
 * @date 2017年12月14日 下午8:20:23 
 *  
 */
public class ConditionFactory {

	private static ConditionFactory conditionFactory = null;

	public static ConditionFactory getInstance() {
		if (conditionFactory == null) {
			conditionFactory = new ConditionFactory();
		}
		return conditionFactory;
	}

	public Condition getCondition(String property, String operator, Object value) {
		return new JpaCondition(property, operator, value);
	}

	public Order getOrder(String propertyName, boolean ascending) {
		return new Order(propertyName, ascending);
	}
}
